// 滑块变量
// 滑块颜色
$scrollbar-thumb-color: #cfcfcf;
// 滑块hover颜色
$scrollbar-thumb-hover-color: #b6b6b6;
// 滑块大小
$scrollbar-thumb-size: 12px;
// 滑块边框大小
$scrollbar-thumb-border-size: 2px;
// 小型滚动条大小
$scrollbar-mini-thumb-size: 8px;
// 轨道颜色
$scrollbar-track-color: transparent;



::-webkit-scrollbar {
  width: $scrollbar-thumb-size;
  height: $scrollbar-thumb-size;
}

::-webkit-scrollbar-thumb {
  border-radius: ($scrollbar-thumb-size / 2);
  border: $scrollbar-thumb-border-size solid transparent;
  background-color: $scrollbar-thumb-color;
  background-clip: padding-box;

  &:hover {
    background-color: $scrollbar-thumb-hover-color;
  }
}

::-webkit-scrollbar-track {
  background: $scrollbar-track-color;
}

::-webkit-scrollbar-corner {
  background: transparent;
}

.knowledge-scrollbar-mini {
  ::-webkit-scrollbar {
    width: $scrollbar-mini-thumb-size;
    height: $scrollbar-mini-thumb-size;
  }

  ::-webkit-scrollbar-thumb {
    border-radius: ($scrollbar-mini-thumb-size / 2);
  }
}

// 兼容火狐
* {
  scrollbar-width: thin;
  scrollbar-color: $scrollbar-thumb-color transparent;
}